//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.ft.adbix.core.widget;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.LinearGradient;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Paint.Style;
import android.graphics.Shader.TileMode;
import android.util.AttributeSet;
import android.view.View;

import com.ft.adbix.utils.data.gather.util.device.DisplayUtil;

public class EnvelopeView extends View {
    private int a = Color.parseColor("#FDE1C9");
    private int b = Color.parseColor("#B1865D");

    public EnvelopeView(Context var1, AttributeSet var2) {
        super(var1, var2);
    }

    protected void onDraw(Canvas var1) {
        Canvas var10000 = var1;
        super.onDraw(var1);
        float var2 = (float)(this.getWidth() / 2);
        float var3 = (float)(this.getHeight() / 2);
        float var4 = (float)this.getWidth();
        float var5 = (float)this.getHeight();
        float var6 = (float) DisplayUtil.dip2px(20);
        Path var7;
        Path var10001 = var7 = new Path();
        float var10005 = var2;
        var7.moveTo(0.0F, 0.0F);
        float var10006 = var3 -= 50.0F;
        Canvas var10009 = var1;
        var7.lineTo(var2, var3);
        var7.lineTo(var4, 0.0F);
        var7.quadTo(var4, 0.0F, var4, 0.0F);
        float var9;
        var7.lineTo(var4, var9 = var5 - var6);
        var7.quadTo(var4, var5, var4 - var6, var5);
        var7.lineTo(var2 = var6 + 0.0F, var5);
        var7.quadTo(0.0F, var5, 0.0F, var9);
        var7.lineTo(0.0F, var2);
        var7.lineTo(0.0F, 0.0F);
        var7.close();
        Paint var10011 = new Paint();
        EnvelopeView var10019 = this;
        EnvelopeView var10020 = this;
        float var8 = (float)this.getHeight();
        int var10 = var10020.a;
        int var11 = var10019.b;
        TileMode var12 = TileMode.CLAMP;
        var10011.setShader(new LinearGradient(0.0F, 0.0F, 0.0F, var8, var10, var11, var12));
        var10011.setStyle(Style.FILL);
        var10011.setAntiAlias(true);
        var10011.setColor(-65536);
        var10011.setStrokeWidth(5.0F);
        var10009.drawPath(var7, var10011);
        var7.reset();
        var7.moveTo(0.0F, 0.0F);
        var7.lineTo(var10005, var10006);
        var10001.lineTo(var4, 0.0F);
        Paint var10002 = new Paint();
        var10002.setAntiAlias(true);
        var10002.setColor(-1);
        var10002.setStyle(Style.STROKE);
        var10002.setStrokeWidth(5.0F);
        var10000.drawPath(var10001, var10002);
    }
}
